@import '../common.scss';

.arrow__container {
  position: relative;

  &:not():first-child {
    background: none;
    background-color: none;

    @include from($tablet) {
      border-left: none;

      &::before {
        content: '';
        background: url('../../images/arrow.svg') no-repeat;
        background-size: contain;
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
      }
    }
  }
}

.arrows--horizontal {
  display: flex;
  position: relative;
  margin: 0;
  align-items: flex-start;
}

.arrow__wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;

  &:first-of-type {
    border-right: none;
    z-index: 20;
  }

  &:nth-of-type(n + 2) {
    margin-left: -4rem;
    z-index: 10;
    .arrow__rectangle {
      border-left: none;
      padding-left: 4rem;
    }
  }

  &:nth-of-type(3) {
    z-index: 5;
  }

  &:hover {
    .arrow__rectangle,
    .arrow__point {
      background-color: $black !important;
      color: $white !important;
    }
    .arrow__rectangle > a {
      color: $white !important;
      background-color: $black !important;
    }
  }
}

.arrow__rectangle {
  padding: 1rem;
  justify-content: center;
  align-items: center;
  border: 2px solid $black;
  border-right: none;
  z-index: 2;
  overflow: hidden;
  font-family: $font-heading;
  position: relative;

  a {
    color: $black;
  }

  @include to($desktop) {
    font-size: 1rem;
  }

  .bold {
    font-weight: $font-weight-semi-bold;
  }

  &--thick-border {
    border: 3px solid $black;
    border-right: none;
  }
}

.arrow__point {
  padding: 1.25rem;
  border: 2px solid $black;
  border-left: none;
  border-bottom: none;
  transform: translate(-1.3rem, 0rem) rotate(45deg);
  z-index: 1;
  overflow: hidden;

  &--thick-border {
    border: 3px solid $black;
    border-left: none;
    border-bottom: none;
  }
}

.arrow__wrapper--stacked {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: auto auto auto 0;

  @include to($tablet) {
    .arrow__rectangle {
      border: none;
      background-color: transparent !important;
      padding: 0;
      font-size: 1rem;
      justify-content: unset;

      > p > span {
        border-bottom: 1px solid $black;
        margin: auto;

        &:hover {
          background-color: $white !important;
          color: black;
        }
      }
    }

    .arrow__point {
      display: none;
    }
  }

  &:nth-of-type(n + 2) {
    margin-top: 1rem;

    @include from($tablet) {
      margin-top: -2px;
    }
  }

  .arrow__rectangle {
    position: relative;

    @include from($tablet) {
      padding: 1.25rem;
    }

    @include from($desktop) {
      padding: 1rem;
    }
  }

  .arrow__point {
    padding: 1.08rem;
    margin-left: 2px;

    @include from($tablet) {
      margin-left: unset;
      padding: 1.25rem;
    }
  }

  &:hover {
    .arrow__rectangle,
    .arrow__point {
      @include from($tablet) {
        background-color: $black !important;
      }
    }
    .arrow--stacked-title,
    .arrow--stacked-letter {
      @include from($tablet) {
        color: $white;
      }
    }
  }
}

.arrow--stacked-title {
  font-family: $font-body;
  color: $black;

  @include from($tablet) {
    white-space: nowrap;
  }
}

.arrow__container--with-link {
  width: 100% !important;
}

.breadcrumb {
  .arrow__wrapper {
    @include to($tablet) {
      display: none;
    }

    &:hover {
      .arrow__rectangle,
      .arrow__point {
        background-color: $black !important;
      }
      .arrow--stacked-title,
      .arrow--stacked-letter {
        color: $white;
      }
    }
  }

  .arrow__rectangle {
    position: relative;

    @include to($tablet) {
      border: none;
      padding: 0;
      font-size: 0.7rem;
      white-space: nowrap;
      background-color: transparent !important;
      color: $black;
    }
  }

  .arrow__point {
    @include to($tablet) {
      display: none;
    }
  }
}
